from loa_game import *
from our_adds.euler_num import QuadState
from our_adds.com import Com
from our_adds.agent_smith import *
#from loa_example import DummyAgent
from game_runner import GameRunner
#from our_adds.mobility import Mobility
#from general import getActionImproved
#from general import getSuccImproved
#from our_adds.com import *
'''
Created on May 29, 2011

@author: bob
'''
#board = ((EMPTY,WHITE,WHITE,WHITE,WHITE,WHITE,EMPTY,EMPTY),
#         (EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,WHITE),
#         (EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY),
#         (EMPTY,EMPTY,WHITE,EMPTY,BLACK,BLACK,EMPTY,EMPTY),
#         (BLACK,EMPTY,WHITE,BLACK,BLACK,BLACK,EMPTY,EMPTY),
#         (EMPTY,EMPTY,BLACK,EMPTY,BLACK,WHITE,WHITE,EMPTY),
#         (BLACK,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,BLACK),
#         (EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY))

#board = ((EMPTY,WHITE,WHITE,WHITE,),
#         (EMPTY,EMPTY,EMPTY,EMPTY,),
#         (EMPTY,EMPTY,EMPTY,EMPTY,),
#         (EMPTY,EMPTY,WHITE,EMPTY,),
#         (BLACK,EMPTY,WHITE,BLACK,BLACK,BLACK,EMPTY,EMPTY),
#         (EMPTY,EMPTY,BLACK,EMPTY,BLACK,WHITE,WHITE,EMPTY),
#         (BLACK,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,BLACK),
#         (EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY,EMPTY))



game = LinesOfActionState(8,40)
#print c.getEnclosingArea(WHITE)
print "start"
smithW = AgentSmith(1, 1, 0)
smithB = AgentSmith(1, 1, 1)#smith.setup(BLACK, game)
#dummy = DummyAgent()
#dummy.setup(WHITE, game)
gr = GameRunner(game, {WHITE:smithW, BLACK:smithB},20,INFINITY)
print gr.run(),"!!!!!!!!!!!"
smithB = AgentSmith(1, 1, 0)
smithW = AgentSmith(1, 1, 1)#smith.setup(BLACK, game)
gr = GameRunner(game, {WHITE:smithW, BLACK:smithB},20,INFINITY)
print gr.run(),"!!!!!!!!!!!"
#connectedness won with 1.5:0.5